home *** CD-ROM | disk | FTP | other *** search
- Path: cypher.3do.com!user
- From: tsw@3do.com (Tom Watson)
- Newsgroups: comp.lang.c
- Subject: Re: File problem with Watcom C/C++ 10.5
- Date: Mon, 08 Apr 1996 18:57:23 -0800
- Organization: The 3DO Corporation
- Distribution: world
- Message-ID: <tsw-0804961857230001@cypher.3do.com>
- References: <4k9fds$4fs@sparcserver.lrz-muenchen.de>
- NNTP-Posting-Host: cypher.3do.com
-
- In article <4k9fds$4fs@sparcserver.lrz-muenchen.de>, Ralph Reichart
- <reichart@informatik.tu-muenchen.de> wrote:
-
- > hi,
- >
- > i have a big problem. i'm trying to open a file with fopen. the program
- > looks like this:
- >
- > #include <stdlib.h>
- > #include <stdio.h>
- >
- > main()
- > {
- > FILE *Datei;
- >
- > Datei = fopen("\autoexec.bat", "r");
-
- ANSI defines '\a' as the "alert" character (probably control-G, or a bell).
- You are trying to use some silly MS-DOSism. Perhaps you should try to use
- forward slashes '/' which are translated into path seperators somewhere
- below the 'fopen' call.
-
- > if (Datei == NULL)
- > {
- > printf("\nSHIT!!");
- > exit(1);
- > };
- > fclose(Datei);
- > }
- >
- > i'm sorry, but i can't open it. i always have the value -1 or 1 in errno.
- > yes, the file exists, but it doesn't matter. it never works.
- > can somebody please help me??
- >
- > ralphy
-
- --
- Tom Watson
- tsw@3do.com (Home: tsw@johana.com)
-